package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.GoodsType;
import com.stlm2.dems.entity.OrderState;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Author：fuchunyu
 * Date：2017/12/20
 * Description：基础积分商品
 */
public class BaseIntegralGoods {
    private Integer id;//唯一标识
    private String abbreviation;//商品描述
    private String name;//商品名称
    private String mainImg;//商品主图
    private String detailsImg;//商品详情
    private Integer state;//商品状态
    private Integer createUserId;//创建人
    private Date createTime;//创建时间
    private Integer updateUserId;//更新人
    private Date updateTime;//更新时间
    private Integer inventory;//现有库存
    private Integer totalInventory;//总库存
    private BigDecimal unitIntegral;//积分单价
    private BigDecimal totalIntegral;//积分总价
    private GoodsType goodsType;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAbbreviation() {
        return abbreviation;
    }

    public void setAbbreviation(String abbreviation) {
        this.abbreviation = abbreviation;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMainImg() {
        return mainImg;
    }

    public void setMainImg(String mainImg) {
        this.mainImg = mainImg;
    }

    public String getDetailsImg() {
        return detailsImg;
    }

    public void setDetailsImg(String detailsImg) {
        this.detailsImg = detailsImg;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getInventory() {
        return inventory;
    }

    public void setInventory(Integer inventory) {
        this.inventory = inventory;
    }

    public Integer getTotalInventory() {
        return totalInventory;
    }

    public void setTotalInventory(Integer totalInventtory) {
        this.totalInventory = totalInventtory;
    }

    public BigDecimal getUnitIntegral() {
        return unitIntegral;
    }

    public void setUnitIntegral(BigDecimal unitIntegral) {
        this.unitIntegral = unitIntegral;
    }

    public BigDecimal getTotalIntegral() {
        return totalIntegral;
    }

    public void setTotalIntegral(BigDecimal totalIntegral) {
        this.totalIntegral = totalIntegral;
    }

    public GoodsType getGoods_type() {
        return goodsType;
    }

    public void setGoods_type(GoodsType goods_type) {
        this.goodsType = goods_type;
    }

    public Integer getGoodsTypeValue(){return (goodsType != null) ? goodsType.getIntValue() : null;}
    public void setGoodsTypeValue(Integer n){
        if(n != null)
            goodsType = GoodsType.getByIntValue(n);
    }
}
